#-- coding:utf-8 --
#程序导入包，让程序能够接收参数

from sys import argv

first, second, third, fifth = argv   #变量的封包,将变量的值赋值给左边的变量名

print "第一个参数", first
print "第二个参数", second
print "第三个参数", third 
print "第四个参数", fifth



# python py12.py 1 2 3 4 ,执行前面命令会出现  ValueError: too many values to unpack 错误 参数超过定向项
# python py12.py 1 2 ,执行前面命令会出现 ValueError: need more than 3 values to unpack 错误 参数不足



from sys import argv

scrpt, filename = argv

txt = open(filename) #读取文件

print "请输入要读取的文件"

print txt.read()

txt.close()

print "修改方法进行文件的二次读取"

file_again = raw_input(">")

txt_again = open(file_again)  #用第二种方法进行读取文件

print txt_again.read()   

txt_again.close()